//
//  NetWorkerManager.h
//  PublicInfo
//
//  Created by enghou on 2017/12/25.
//  Copyright © 2017年 xyxorigation. All rights reserved.
//

#pragma mark - 对 AFN再封装一层

typedef void (^completeBlock)(BaseModel *model);

typedef void (^failBlock)(NSInteger code);

typedef void (^comptBlock)(NSDictionary *source);

#import <Foundation/Foundation.h>
#import "NetPath.h"
@interface NetWorkerManager : NSObject

+(instancetype)sharedInstance;

-(void)configOtherURL:(NSString *)url;

-(NSString *)baseURL;

-(void)getCurrentPositionAndGridsSuccessBlock:(completeBlock)suc failBlock:(failBlock)fail;

//-(void)getFloatPeopleListWithParam:(NSDictionary *)param SuccessBlock:(completeBlock)suc failBlock:(failBlock)fail;

-(void)addNewPeopleInfoWithParam:(NSDictionary *)param successBlock:(completeBlock)suc failBlock:(failBlock)fail;
-(void)updatePeopleInfoWithParam:(NSDictionary *)param successBlock:(completeBlock)suc failBlock:(failBlock)fail;



-(void)deletePersonWithId:(NSString *)pid successBlock:(completeBlock)suc failBlock:(failBlock)fail;

-(void)getPersonalInfoWithCardId:(NSString *)cid successBlock:(completeBlock)suc failBlock:(failBlock)fail;

-(void)getHousingInfoWithId:(NSString *)hid successBlock:(completeBlock)suc failBlock:(failBlock)fail;


-(void)getProvincesSuccessBlock:(completeBlock)cmpt failBlock:(failBlock)fail;

-(void)loginWithAccount:(NSString *)account password:(NSString *)pwd successBlock:(completeBlock)suc failBlock:(failBlock)fail;

-(void)getStasticInfoWithUid:(NSString *)uid successBlock:(completeBlock)suc failBlock:(failBlock)fail;

-(void)getMailListWithPage:(NSInteger)page condition:(NSDictionary *)condition successBlock:(completeBlock)suc failBlock:(failBlock)fail;

-(void)getMailWithId:(NSString *)mid successBlock:(completeBlock)suc failBlock:(failBlock)fail;

-(void)delMailWithId:(NSString *)mid successBlock:(completeBlock)suc failBlock:(failBlock)fail;

-(void)queryMailTypeWithCondition:(NSDictionary *)condition successBlock:(completeBlock)suc failBlock:(failBlock)fail;

-(void)markReadWithId:(NSString *)item_id successBlock:(completeBlock)suc failBlock:(failBlock)fail;

-(void)postWithPath:(NSString *)path parameter:(NSDictionary *)parameter completeBlock:(comptBlock)cmpt failBlock:(failBlock)fail;

-(void)getWithPath:(NSString *)path parameter:(NSDictionary *)parameter completeBlock:(comptBlock)cmpt failBlock:(failBlock)fail;

-(void)getEventTypeSuccess:(completeBlock)suc failBlock:(failBlock)fail;

-(void)getPropertyDictWithDomainName:(NSString *)domainName successBlock:(completeBlock)suc failBlock:(failBlock)fail;

-(void)preHandleWithStepId:(NSString *)stepid successBlock:(completeBlock)suc failBlock:(failBlock)fail;

-(void)handleProblemWithCode:(NSString *)code param:(NSDictionary *)param successBlock:(completeBlock)suc failBlock:(failBlock)fail;

-(void)problemDetailWithPid:(NSString *)pid stepId:(NSString *)stepId stepStatusCode:(NSString *)code successBlock:(completeBlock)suc failBlock:(failBlock)fail;

-(void)deleteProblemWithPid:(NSString *)pid successBlock:(completeBlock)suc failBlock:(failBlock)fail;

-(void)deleteWithPath:(NSString *)path parameter:(NSDictionary *)parameter completeBlock:(comptBlock)cmpt failBlock:(failBlock)fail;


#pragma mark - 只需要简单提示成功或者失败的统一走这个接口
-(void)commonAlertInterfaceWithPath:(NSString *)path parameter:(NSDictionary *)param successBlock:(completeBlock)suc failBlock:(failBlock)fail;

-(void)uploadImageWithPath:(NSString *)path parameter:(NSDictionary *)parameter files:(NSArray *)files fileName:(NSString *)name suffix:(NSString *)suffix completeBlock:(comptBlock)cmpt failBlock:(failBlock)fail;

-(void)uploadVideoWithPath:(NSString *)path parameter:(NSDictionary *)parameter files:(NSArray *)files fileName:(NSString *)name suffix:(NSString *)suffix completeBlock:(comptBlock)cmpt failBlock:(failBlock)fail;

-(void)uploadAudeoWithPath:(NSString *)path parameter:(NSDictionary *)parameter files:(NSArray *)files fileName:(NSString *)name suffix:(NSString *)suffix completeBlock:(comptBlock)cmpt failBlock:(failBlock)fail;

-(void)uploadFileWithPath:(NSString *)path parameter:(NSDictionary *)parameter files:(NSArray *)files fileNameKey:(NSString *)name contentType:(NSString *)cntType sufix:(NSString *)sufix completeBlock:(comptBlock)cmpt failBlock:(failBlock)fail;

@end
